/*  ----------------------------------------------------------------------------
*	This file is part of the AS3This ActionScript 3 library.
*	Author: Steve Jones for G-RAFF <http://www.g-raff.com/>
*	Copyright (c) 2009 raffWorks Ltd.
*	----------------------------------------------------------------------------
*	Please see the notice at the bottom of the code before using or modifying this class.
*/
package com.as3this.events
{
	import flash.events.Event;

	public class AddThisEvent extends Event
	{
		public static const SHARE			:String = "share";
		public static const META_DATA		:String = "metaData";
		
		private var _data	:Object;
		
		/**
		 * Constructor
		 * <p>A custom event class for passing optional data along with event types</p>
		 * @param type The type of event
		 * @param data An optional data object to be passed in this event
		 */
		 
		public function AddThisEvent(type:String, data:Object=null, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			_data = data;
			super(type, bubbles, cancelable);
		}
		
		/**
		 * The optional data object passed in the event
		 */
		public function get data() : Object
		{
			return _data;
		}
		
	}
}

/*
 *    AS3This is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    AS3This is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with AS3This.  If not, see <http://www.gnu.org/licenses/>.
 */